<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        #box{
            width: 500px;
            height: 100px;
            border: 2px solid rosybrown;
        }
    </style>
    <script type="text/javascript">
        function fn(){
        document.getElementById('sp').innerText = input.innerText;
        }
        function start(){       
            var input = document.getElementsByClassName('text')
            document.getElementById('sp').innerText='正在复制中....'
            setTimeout(fn,1000)
        }
    
    </script>
</head>
<body>
    <input type="text">&nbsp;
    <button onclick="start()">复制</button>
    <div id="box">    
    <span id="sp"></span>   
    </div>
   
</body>
</html>